<template>
<div class="account">
    <Header></Header>
    <div class="content">
        <div class="left">
            <ul>
                <li v-for="(item , index) in navList" :key="index" @click="navIndex= item.id" :class="navIndex == item.id?'active':''">
                    <router-link class="item-link" :to="item.link">
                        <i :class="'icons icon-'+item.id"></i>{{item.name}}
                    </router-link>
                </li>
            </ul>
        </div>
        <router-view @navIndex="showMsg"></router-view>
    </div>
    <Footer></Footer>
</div>
</template>

<script>
  import Header from '@/views/components/header/header'
  import Footer from '@/views/components/header/footer'
export default {
  name: "reg",
  data() {
    return {
        navIndex: 1,
        navList:[
            {id: 1, name: '个人中心', link: '/account'},
            {id: 2, name: '我的简历', link: '/account/myResume'},
            {id: 3, name: '求职管理', link: '/account/jobManage'},
            {id: 4, name: '收藏/关注', link: '/account/favorites'},
            {id: 5, name: '账号管理', link: '/account/basicInfo'},
            {id: 6, name: '消息中心', link: '/account/message'},
            {id: 7, name: '沟通记录', link: '/account/chats'},
        ]
    };
  },
  components:{Header, Footer},
  methods:{
    showMsg(val){
        this.navIndex = val
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.header {
    // position: absolute;
    // width: 100%;
    // top: 0;
    >>>.top{
        background: rgba(59, 77, 102, 1) !important;
    }
    >>>.nav {
        background: rgba(67, 87, 114, 1) !important;
    }
}

.content{
    width: 1200px;
    min-height: 850px;
    height: auto;
    margin: 35px auto 65px;
    overflow: hidden;

    .left{
        width: 210px;
        height: 380px;
        background: #fff;
        float: left;

        ul{
            margin-top: 40px;
            li{
                margin-top: 20px;
                height: 26px;
                font-size: 16px;
                font-family: Microsoft YaHei;
                font-weight: 400;
                color: #777777;
                line-height: 26px;
                cursor: pointer;
                &.active{
                    border-left: 4px solid #3DABC4;
                    color: #3DABC4;
                    font-weight: bold;
                    a{
                        margin-left: -4px;
                    }
                    .icons{
                        &.icon-1{
                            background: url(../../assets/image/icon-1-ac.png) no-repeat;
                        }
                        &.icon-2{
                            background: url(../../assets/image/icon-2-ac.png) no-repeat;
                        }
                        &.icon-3{
                            background: url(../../assets/image/icon-3-ac.png) no-repeat;
                        }
                        &.icon-4{
                            background: url(../../assets/image/icon-4-ac.png) no-repeat;
                        }
                        &.icon-5{
                            background: url(../../assets/image/icon-5-ac.png) no-repeat;
                        }
                        &.icon-6{
                            background: url(../../assets/image/icon-6-ac.png) no-repeat;
                        }
                        &.icon-7{
                            background: url(../../assets/image/icon-6-ac.png) no-repeat;
                        }
                    }
                }

                .icons{
                    width: 20px;
                    height: 20px;
                    margin-bottom: -5px;
                    margin-right: 10px;
                    display: inline-block;
                    margin-left: 33px;
                    &.icon-1{
                        background: url(../../assets/image/icon-1.png) no-repeat;
                    }
                    &.icon-2{
                        background: url(../../assets/image/icon-2.png) no-repeat;
                    }
                    &.icon-3{
                        background: url(../../assets/image/icon-3.png) no-repeat;
                    }
                    &.icon-4{
                        background: url(../../assets/image/icon-4.png) no-repeat;
                    }
                    &.icon-5{
                        background: url(../../assets/image/icon-5.png) no-repeat;
                    }
                    &.icon-6{
                        background: url(../../assets/image/icon-6.png) no-repeat;
                    }
                    &.icon-7{
                        background: url(../../assets/image/icon-6.png) no-repeat;
                    }
                }
            }
        }
    }

    .right{
        float: right;
        width: 970px;
        height: 850px;
        background: #fff;
    }
}

</style>